﻿@{
    ViewBag.Title = "TaskAmbulanceDetial";
    Layout = "~/Areas/IM/Views/Shared/_Layout.cshtml";
}
@section Scripts{
    <script type="text/javascript">


        $(document).ready(function () {
            BindCombobox();
            getTaskInfo();
            //getTaskGreenDateInfo();
        });

        //获取任务车辆信息
        function getTaskInfo() {
            $.ajax({
                type: 'POST',
                url: '@Url.Content("~/DD/AcceptEvent/GetTaskAmbulance")',
                data:
                    {
                        taskCode: $("#TCID").val()
                    },
                dataType: "json",
                success: function (jsData) {
                    $('#DispatcherName').html(jsData.PRInfo.DispatcherName);
                    $('#StationName').html(jsData.PRInfo.StationName);
                    $('#AmbulanceCode').html(jsData.PRInfo.AmbulanceCode);
                    $('#TaskStreamNumber').html(jsData.PRInfo.TaskStreamNumber);
                    $('#UserFlowNumber').html(jsData.PRInfo.UserFlowNumber);
                    $('#TCenterName').html(jsData.PRInfo.CenterName);
                    //将日期时间格式化，调动formatTime();

                    var fCommandTime = $.formatTime(jsData.PRInfo.StartTaskTime);
                    $('#StartTaskTime').html(fCommandTime);
                    // var fCommandT = $.formatTime(jsData.PRInfo.GetCommandTime);
                    $('#GetCommandTime').html(jsData.PRInfo.GetCommandTime);
                    // var fOutAmbulanceTime = $.formatTime(jsData.PRInfo.OutAmbulanceTime);
                    $('#OutAmbulanceTime').html(jsData.PRInfo.OutAmbulanceTime);
                    // var fArriveSenceTime = $.formatTime(jsData.PRInfo.ArriveSenceTime);
                    $('#ArriveSenceTime').html(jsData.PRInfo.ArriveSenceTime);
                    //var fLeaveSenceTime = $.formatTime(jsData.PRInfo.LeaveSenceTime);
                    $('#LeaveSenceTime').html(jsData.PRInfo.LeaveSenceTime);
                    // var fArriveHospitalTime = $.formatTime(jsData.PRInfo.ArriveHospitalTime);
                    $('#ArriveHospitalTime').html(jsData.PRInfo.ArriveHospitalTime);
                    // var fMissionCompleteTime = $.formatTime(jsData.PRInfo.MissionCompleteTime);
                    $('#MissionCompleteTime').html(jsData.PRInfo.MissionCompleteTime);
                    //  var fReturnStationTime = $.formatTime(jsData.PRInfo.ReturnStationTime);
                    $('#ReturnStationTime').html(jsData.PRInfo.ReturnStationTime);
                    $('#DriveKM').html(jsData.PRInfo.DriveKM + "公里");
                    $('#EmergencyKM').html(jsData.PRInfo.EmergencyKM + "公里");
                    $('#PatientCount').html(jsData.PRInfo.PatientCount);
                    if (jsData.PRInfo.IsOutFromStation)
                    { $('#IsOutFromStation').html("是"); }
                    else {
                        $('#IsOutFromStation').html("否");
                    };
                    if (jsData.PRInfo.IFCarryout)
                    { $('#IFCarryout').html("是"); }
                    else {
                        $('#IFCarryout').html("否");
                    };
                    if (jsData.PRInfo.IFNormalEnd)
                    { $('#IFNormalEnd').html("是"); }
                    else {
                        $('#IFNormalEnd').html("否");
                    };
                    $('#ResultReason').html(jsData.PRInfo.ResultReason);
                    $('#ForeTaskID').html(jsData.PRInfo.ForeTaskID);
                    $('#FactAddr').html(jsData.PRInfo.FactAddr);

                    $('#TaskCode').html(jsData.PRInfo.TaskCode);
                    $('#AmbulanceType').html(jsData.PRInfo.AmbulanceType);
                    $('#AmbulanceNumber').html(jsData.PRInfo.AmbulanceNumber);
                    $('#RealAmbulanceSign').html(jsData.PRInfo.RealAmbulanceSign);
                    $('#AmbulanceTel').html(jsData.PRInfo.AmbulanceTel);
                    $('#TaskRemark').html(jsData.PRInfo.TaskRemark);
                    $('#Driver').html(jsData.PRInfo.Driver);
                    $('#Doctor').html(jsData.PRInfo.Doctor);
                    $('#Nurse').html(jsData.PRInfo.Nurse);
                    $('#Rescue').html(jsData.PRInfo.Rescue);
                    $('#DanJiaGong').html(jsData.PRInfo.DanJiaGong);
                    if ('@ViewData["RolePermissionInsert"]' == "Insert") {
                        //$('#TaskEdit').show();
                        $('#TaskEdit').hide(); //add2021-04-22 plq 郊区不允许修改

                        //修改信息
                        $('#EStationID').combobox('setValue', jsData.PRInfo.StationCode);
                        $('#EAmbulanceCode').combobox('setValue', jsData.PRInfo.AmbulanceCode);
                        $('#EDriveKM').textbox('setValue', jsData.PRInfo.DriveKM);
                        $('#EEmergencyKM').textbox('setValue', jsData.PRInfo.EmergencyKM);
                        if (jsData.PRInfo.IFNormalEnd) {
                            $('#ETaskResult').combobox('select', 'True');
                            $('#ETaskReason').combotree("disable");
                            $('#ERemark').textbox("disable");
                        }
                        else {
                            $('#ETaskResult').combobox('select', 'False');
                            $('#ETaskReason').combotree("enable");
                            $('#ERemark').textbox("enable");
                        };
                        $('#ETaskReason').combotree('setValue', jsData.PRInfo.ResultCode);
                        $('#ERemark').textbox('setValue', jsData.PRInfo.TaskRemark);
                        $('#EPatientCount').textbox('setValue', jsData.PRInfo.PatientCount);
                        $('#LDriver').html(jsData.PRInfo.Driver);
                        $('#LDoctor').html(jsData.PRInfo.Doctor);
                        $('#LNurse').html(jsData.PRInfo.Nurse);
                        $('#LRescue').html(jsData.PRInfo.Rescue);
                        $('#LLitter').html(jsData.PRInfo.DanJiaGong);
                        $('#HDriverCodes').val(jsData.PRInfo.DriverCodes);
                        $('#HDoctorCodes').val(jsData.PRInfo.DoctorCodes);
                        $('#HNurseCodes').val(jsData.PRInfo.NurseCodes);
                        $('#HLitterCodes').val(jsData.PRInfo.LitterCodes);
                        $('#HRescueCodes').val(jsData.PRInfo.RescueCodes);
                        $('#EReceiveCommandTime').datetimebox('setValue', jsData.PRInfo.GetCommandTime);
                        $('#EOutTime').datetimebox('setValue', jsData.PRInfo.OutAmbulanceTime);
                        $('#EArriveLocalTime').datetimebox('setValue', jsData.PRInfo.ArriveSenceTime);
                        $('#ELeaveLocalTime').datetimebox('setValue', jsData.PRInfo.LeaveSenceTime);
                        $('#EArriveHospitalTime').datetimebox('setValue', jsData.PRInfo.ArriveHospitalTime);
                        $('#EFinishTime').datetimebox('setValue', jsData.PRInfo.MissionCompleteTime);
                        $('#EReturnStationTime').datetimebox('setValue', jsData.PRInfo.ReturnStationTime);

                        $('#HTaskID').val(jsData.PRInfo.TaskCode);
                        $('#HStationID').val(jsData.PRInfo.StationCode);
                        $('#HAmbulanceID').val(jsData.PRInfo.AmbulanceCode);
                        $('#HTaskResult').val(jsData.PRInfo.IFNormalEnd);
                        $('#HTaskReason').val(jsData.PRInfo.ResultReason);
                        $('#HDriverNames').val(jsData.PRInfo.Driver);
                        $('#HDoctorNames').val(jsData.PRInfo.Doctor);
                        $('#HNurseNames').val(jsData.PRInfo.Nurse);
                        $('#HLitterNames').val(jsData.PRInfo.DanJiaGong);
                        $('#HRescueNames').val(jsData.PRInfo.Rescue);
                    }
                    else { $('#TaskEdit').hide(); }
                }
            });
        }
        function BindCombobox() {
            //分站
            $("#EStationID").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetSationName?centerID=-1")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                onChange: function (n, o) {
                }
            });
            //车辆
            $("#EAmbulanceCode").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetAmbulanceName?stationID=-1")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                onChange: function (n, o) {
                }
            });
            //司机
            $("#EDriver").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetPersonForType?RoleID=3")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                OneOption: [{
                    ID: "",
                    Name: "--请选择--"
                }]
            });
            //医生
            $("#EDoctor").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetPersonForType?RoleID=4")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                OneOption: [{
                    ID: "",
                    Name: "--请选择--"
                }]
            });
            //护士
            $("#ENurse").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetPersonForType?RoleID=5")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                OneOption: [{
                    ID: "",
                    Name: "--请选择--"
                }]
            });
            //担架工
            $("#ELitter").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetPersonForType?RoleID=6")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                OneOption: [{
                    ID: "",
                    Name: "--请选择--"
                }]
            });
            //抢救员
            $("#ERescue").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetPersonForType?RoleID=7")',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                OneOption: [{
                    ID: "",
                    Name: "--请选择--"
                }]
            });
            //完成结果
            $("#ETaskResult").combobox({
                url: '@Url.Content("~/BB/AllDictionary/GetTaskResult")',
                method: 'POST',
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                onSelect: function () {
                    var id = $('#ETaskResult').combobox('getValues');
                    if (id == "True") {
                        $('#ETaskReason').combotree("disable");
                        $('#ERemark').textbox("disable");
                    }
                    else {
                        $('#ETaskReason').combotree("enable");
                        $('#ERemark').textbox("enable");
                    }
                },
                onUnselect: function () {
                    var id = $('#ETaskResult').combobox('getValues');
                    if (id == "True") {
                        $('#ETaskReason').combotree("disable");
                        $('#ERemark').textbox("disable");
                    }
                    else {
                        $('#ETaskReason').combotree("enable");
                        $('#ERemark').textbox("enable");
                    }
                }
            });
            //异常结束原因
            $('#ETaskReason').combotree({
                url: '@Url.Content("~/BB/AllDictionary/GetTaskReason")',
                valueField: 'id',
                textField: 'text',
                editable: false,
                OneOption: [{
                    id: "-1",
                    text: "--请选择--"
                }]
            });
        }
        @*function getTaskGreenDateInfo() {
            $.ajax({
                type: 'POST',
                url: '@Url.Content("~/DD/AcceptEvent/GetTaskGreenDate")',
                data:
                    {
                        taskCode: $("#TCID").val()
                    },
                dataType: "json",
                success: function (jsData) {


                    $('#PatientName').html(jsData.GDInfo.DispatcherName);
                    $('#NiZhen').html(jsData.GDInfo.NiZhen);
                    $('#SongWangYiYuan').html(jsData.GDInfo.SongWangYiYuan);
                    $('#LianXiDianHua').html(jsData.GDInfo.LianXiDianHua);
                    $('#YuBaoRen').html(jsData.GDInfo.YuBaoRen);
                    $('#DengLuRen').html(jsData.GDInfo.DengLuRen);
                    $('#GreenRemark').html(jsData.GDInfo.GreenRemark);
                    //将日期时间格式化，调动formatTime();
                  //  var fShiJian= $.formatTime(jsData.GDInfo.ShiJian);
                    $('#ShiJian').html(jsData.GDInfo.ShiJian);
                }
            });
        }*@
    </script>

    <script type="text/javascript">
        //删除司机
        function DelDriver() {
            var oDriver = $('#LDriver').text();
            var oDriverCodes = $('#HDriverCodes').val();
            if (oDriver.length > 0) {
                var nDriver = oDriver.substring(0, oDriver.lastIndexOf(","));
                var nDriverCodes = oDriverCodes.substring(0, oDriverCodes.lastIndexOf("|"));
                $('#LDriver').html(nDriver);
                $('#HDriverNames').val(nDriver);
                $('#HDriverCodes').val(nDriverCodes);
            }
        }
        //删除医生
        function DelDoctor() {
            var oDoctor = $('#LDoctor').text();
            var oDoctorCodes = $('#HDoctorCodes').val();
            if (oDoctor.length > 0) {
                var nDoctor = oDoctor.substring(0, oDoctor.lastIndexOf(","));
                var nDoctorCodes = oDoctorCodes.substring(0, oDoctorCodes.lastIndexOf("|"));
                $('#LDoctor').html(nDoctor);
                $('#HDoctorNames').val(nDoctor);
                $('#HDoctorCodes').val(nDoctorCodes);
            }
        }
        //删除护士
        function DelNurse() {
            var oNurse = $('#LNurse').text();
            var oNurseCodes = $('#HNurseCodes').val();
            if (oNurse.length > 0) {
                var nNurse = oNurse.substring(0, oNurse.lastIndexOf(","));
                var nNurseCodes = oNurseCodes.substring(0, oNurseCodes.lastIndexOf("|"));
                $('#LNurse').html(nNurse);
                $('#HNurseNames').val(nNurse);
                $('#HNurseCodes').val(nNurseCodes);
            }
        }
        //删除担架工
        function DelLitter() {
            var oLitter = $('#LLitter').text();
            var oLitterCodes = $('#HLitterCodes').val();
            if (oLitter.length > 0) {
                var nLitter = oLitter.substring(0, oLitter.lastIndexOf(","));
                var nLitterCodes = oLitterCodes.substring(0, oLitterCodes.lastIndexOf("|"));
                $('#LLitter').html(nLitter);
                $('#HLitterNames').val(nLitter);
                $('#HLitterCodes').val(nLitterCodes);
            }
        }
        //删除抢救员
        function DelRescue() {
            var oRescue = $('#LRescue').text();
            var oRescueCodes = $('#HRescueCodes').val();
            if (oRescue.length > 0) {
                var nRescue = oRescue.substring(0, oRescue.lastIndexOf(","));
                var nRescueCodes = oRescueCodes.substring(0, oRescueCodes.lastIndexOf("|"));
                $('#LRescue').html(nRescue);
                $('#HRescueNames').val(nRescue);
                $('#HRescueCodes').val(nRescueCodes);
            }
        }
        //添加司机-------------------------------------------------------------------------------
        function AddDriver() {
            var oDriver = $('#LDriver').text();
            var oDriverCodes = $('#HDriverCodes').val();
            if (oDriver.length > 0) {
                //已经存在
                if (oDriverCodes.indexOf($('#EDriver').combobox('getValue')) >= 0)
                { }
                else
                {
                    $('#LDriver').html(oDriver + "," + $('#EDriver').combobox('getText'));
                    $('#HDriverCodes').val(oDriverCodes + "|" + $('#EDriver').combobox('getValue'));
                }
            }
            else {
                $('#LDriver').html($('#EDriver').combobox('getText'));
                $('#HDriverCodes').val($('#EDriver').combobox('getValue'));
            }
            $('#HDriverNames').val($('#LDriver').text());
        }
        //添加医生
        function AddDoctor() {
            var oDoctor = $('#LDoctor').text();
            var oDoctorCodes = $('#HDoctorCodes').val();
            if (oDoctor.length > 0) {
                //已经存在
                if (oDoctorCodes.indexOf($('#EDoctor').combobox('getValue')) >= 0)
                { }
                else
                {
                    $('#LDoctor').html(oDoctor + "," + $('#EDoctor').combobox('getText'));
                    $('#HDoctorCodes').val(oDoctorCodes + "|" + $('#EDoctor').combobox('getValue'));
                }
            }
            else {
                $('#LDoctor').html($('#EDoctor').combobox('getText'));
                $('#HDoctorCodes').val($('#EDoctor').combobox('getValue'));
            }
            $('#HDoctorNames').val($('#LDoctor').text());
        }
        //添加护士
        function AddNurse() {
            var oNurse = $('#LNurse').text();
            var oNurseCodes = $('#HNurseCodes').val();
            if (oNurse.length > 0) {
                //已经存在
                if (oNurseCodes.indexOf($('#ENurse').combobox('getValue')) >= 0)
                { }
                else
                {
                    $('#LNurse').html(oNurse + "," + $('#ENurse').combobox('getText'));
                    $('#HNurseCodes').val(oNurseCodes + "|" + $('#ENurse').combobox('getValue'));
                }
            }
            else {
                $('#LNurse').html($('#ENurse').combobox('getText'));
                $('#HNurseCodes').val($('#ENurse').combobox('getValue'));
            }
            $('#HNurseNames').val($('#LNurse').text());
        }
        //添加担架工
        function AddLitter() {
            var oLitter = $('#LLitter').text();
            var oLitterCodes = $('#HLitterCodes').val();
            if (oLitter.length > 0) {
                //已经存在
                if (oLitterCodes.indexOf($('#ELitter').combobox('getValue')) >= 0)
                { }
                else
                {
                    $('#LLitter').html(oLitter + "," + $('#ELitter').combobox('getText'));
                    $('#HLitterCodes').val(oLitterCodes + "|" + $('#ELitter').combobox('getValue'));
                }
            }
            else {
                $('#LLitter').html($('#ELitter').combobox('getText'));
                $('#HLitterCodes').val($('#ELitter').combobox('getValue'));
            }
            $('#HLitterNames').val($('#LLitter').text());
        }
        //添加抢救员
        function AddRescue() {
            var oRescue = $('#LRescue').text();
            var oRescueCodes = $('#HRescueCodes').val();
            if (oRescue.length > 0) {
                //已经存在
                if (oRescueCodes.indexOf($('#ERescue').combobox('getValue')) >= 0)
                { }
                else
                {
                    $('#LRescue').html(oRescue + "," + $('#ERescue').combobox('getText'));
                    $('#HRescueCodes').val(oRescueCodes + "|" + $('#ERescue').combobox('getValue'));
                }
            }
            else {
                $('#LRescue').html($('#ERescue').combobox('getText'));
                $('#HRescueCodes').val($('#ERescue').combobox('getValue'));
            }
            $('#HRescueNames').val($('#LRescue').text());
        }
    </script>
    <script type="text/javascript">
        function SaveTaskInfo() {
            $('#ff').form('submit', {
                onSubmit: function () {
                    $('#HStationID').val($('#EStationID').combobox('getValue'));
                    $('#HAmbulanceID').val($('#EAmbulanceCode').combobox('getValue'));
                    $('#HTaskResult').val($('#ETaskResult').combobox('getValue'));
                    $('#HTaskReason').val($('#ETaskReason').combobox('getValue'));
                    return $(this).form('validate');
                },
                success: function (msg) {
                    var data = eval('(' + msg + ')');
                    if (data.IsSuccess) {
                        $.messager.alert('提示', data.Message, 'info', function () {
                            location.reload();
                            closeDialog();
                        });
                    }
                    else {
                        $.messager.alert('提示', data.Message, 'info', function () {
                        });
                    }
                }
            });
        }
        function closeDialogLookCrack() {
            $('#LookCrack').window('close');
        }
        //显示修改痕迹
        function ViewModify() {
            $('#CrackList').datagrid({
                title: '修改记录列表',
                width: '99%',
                height: 460,
                nowrap: true,
                autoRowHeight: true,
                striped: true,
                collapsible: true,
                url: '@Url.Content("~/Task/GetCrackInfos?TaskCode=")' + '@ViewBag.taskCode',
                //sortName: 'ChanShengShiKe',
                //sortOrder: 'desc',
                remoteSort: false,
                singleSelect: true,
                frozenColumns: [[
                    { title: '修改时间', field: 'StringOperateTime', width: 120, sortable: true },
                    { title: '修改人', field: 'OperatorName', width: 70, sortable: false },
                    { title: '修改项目', field: 'TypeName', width: 80, sortable: false },
                    { title: '修改前内容', field: 'OriginContent', width: 160, sortable: false },
                    { title: '修改后内容', field: 'NewContent', width: 160, sortable: false },
                    { title: '任务编码', field: 'TaskCode', width: 180, sortable: false }
                ]],
                pagination: true,//启用分页，默认每页10行
                rownumbers: true,//显示页码，默认 提供 10 - 50 的页容量选择下拉框
                pageNumber: 1,
                pageSize: 15,//设置 页容量5为
                pageList: [10, 15, 20]//设置 页容量下拉框

            });
            var p = $('#CrackList').datagrid('getPager');
            $(p).pagination({
                onBeforeRefresh: function () {
                }
            });
            $('#LookCrack').window('open');
        }
    </script>
}
<div id="divIndex" class="easyui-layout" style="width:auto; height: auto; margin-left: auto; margin-right: auto">
    <input name="txtEC" type="hidden" id="TCID" value="@ViewBag.taskCode" />
    <div style="width: 99%; height: 99%;">
        <div style="width: 99%; height: 230px;">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 99%; text-align: left; margin-left: 0px; margin-right: 0px; margin-top: 5px; font-size:small">
                <tr style="height: 28px; ">
                    <td style="width:10%" align="right">
                        责任调度人：
                    </td>
                    <td>
                        <span id="DispatcherName" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        出车分站：
                    </td>
                    <td>
                        <span id="StationName" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        车辆编码：
                    </td>
                    <td>
                        <span id="AmbulanceCode" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px; ">
                    <td style="width: 10%" align="right">
                        任务流水号：
                    </td>
                    <td>
                        <span id="TaskStreamNumber" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        用户流水号：
                    </td>
                    <td>
                        <span id="UserFlowNumber" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        所属中心：
                    </td>
                    <td>
                        <span id="TCenterName" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px;">
                    <td style="width: 10%" align="right">
                        生成任务时刻：
                    </td>
                    <td>
                        <span id="StartTaskTime" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        接收命令时刻：
                    </td>
                    <td>
                        <span id="GetCommandTime" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        出车时刻：
                    </td>
                    <td>
                        <span id="OutAmbulanceTime" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px;">
                    <td style="width: 10%" align="right">
                        到达现场时刻：
                    </td>
                    <td>
                        <span id="ArriveSenceTime" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        离开现场时刻：
                    </td>
                    <td>
                        <span id="LeaveSenceTime" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        到达医院时刻：
                    </td>
                    <td>
                        <span id="ArriveHospitalTime" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px;">
                    <td style="width: 10%" align="right">
                        完成时刻：
                    </td>
                    <td>
                        <span id="MissionCompleteTime" style="width:150px;"></span>

                    </td>
                    <td style="width: 10%" align="right">
                        返回站中时刻：
                    </td>
                    <td>
                        <span id="ReturnStationTime" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        行驶公里数：
                    </td>
                    <td>
                        <span id="DriveKM" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px;">
                    <td style="width: 10%" align="right">
                        是否站内出动：
                    </td>
                    <td>
                        <span id="IsOutFromStation" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        实际救治人数：
                    </td>
                    <td>
                        <span id="PatientCount" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        急救公里数：
                    </td>
                    <td>
                        <span id="EmergencyKM" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px;">
                    <td style="width: 10%" align="right">
                        是否正常结束：
                    </td>
                    <td>
                        <span id="IFNormalEnd" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">异常结束原因：</td>
                    <td>
                        <span id="ResultReason" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">
                        是否执行中：
                    </td>
                    <td>
                        <span id="IFCarryout" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px;">
                    <td style="width: 10%" align="right">
                        改派前任务：
                    </td>
                    <td>
                        <span id="ForeTaskID" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right">实际送往地点：</td>
                    <td>
                        <span id="FactAddr" style="width:150px;"></span>
                    </td>
                    <td style="width: 10%" align="right"></td>
                    <td></td>
                </tr>
            </table>

        </div>  @*任务详情*@
        <div class="easyui-panel" title="车辆信息" style="width:100%;height:160px;">
            <table border="0" id="AmbulanceInfo" style=" width: 99%; margin-top: 5px; font-size: small">
                <tr style="height: 28px; ">
                    <td align="right">
                        任务编码：
                    </td>
                    <td width="18%">
                        <span id="TaskCode" style="width:150px;"></span>
                    </td>
                    <td align="right">
                        车辆类型：
                    </td>
                    <td width="18%">
                        <span id="AmbulanceType" style="width:150px;"></span>
                    </td>
                    <td align="right">
                        车牌号码：
                    </td>
                    <td width="18%">
                        <span id="AmbulanceNumber" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px; ">
                    <td align="right">
                        实际标识：
                    </td>
                    <td width="18%">
                        <span id="RealAmbulanceSign" style="width:150px;"></span>
                    </td>
                    <td align="right">
                        随车电话：
                    </td>
                    <td colspan="3" width="18%">
                        <span id="AmbulanceTel" style="width:150px;"></span>
                    </td>

                </tr>
                <tr style="height: 28px; ">
                    <td align="right">
                        司&nbsp;机：
                    </td>
                    <td width="18%">
                        <span id="Driver" style="width:150px;"></span>
                    </td>
                    <td align="right">
                        医&nbsp;生：
                    </td>
                    <td width="18%">
                        <span id="Doctor" style="width:150px;"></span>
                    </td>
                    <td align="right">
                        护&nbsp;士：
                    </td>
                    <td width="18%">
                        <span id="Nurse" style="width:150px;"></span>
                    </td>
                </tr>
                <tr style="height: 28px; ">
                    <td align="right">
                        担架工：
                    </td>
                    <td width="18%">
                        <span id="DanJiaGong" style="width:150px;"></span>
                    </td>
                    <td align="right">
                        抢救员：
                    </td>
                    <td width="18%">
                        <span id="Rescue" style="width:150px;"></span>
                    </td>
                    <td align="right"></td>
                    <td width="18%"></td>
                </tr>
            </table>
        </div>
        <div class="easyui-panel" title="备注" style="width:100%;height:80px;">
            <p id="TaskRemark" style="font-size:small"></p>
        </div>
        <!--修改任务信息-->
        <div id="TaskEdit">
            <div class="easyui-panel" title="修改信息" style="width:100%;height:240px;">
                <form id="ff" method="post" action="~/Task/UpdateTask/" enctype="multipart/form-data">
                    <table border="0" style=" width: 99%; margin-top: 5px; font-size: small">
                        <tr style="height: 22px; ">
                            <td align="right" width="10%">
                                出车分站：
                            </td>
                            <td width="15%">
                                <select id="EStationID" class="easyui-combobox" style="width:150px"></select>
                                <input type="hidden" id="HStationID" name="StationCode" />
                                <input type="hidden" id="HTaskID" name="TaskCode" />
                            </td>
                            <td align="right" width="10%">
                                车辆：
                            </td>
                            <td width="15%">
                                <select id="EAmbulanceCode" class="easyui-combobox" style="width:150px"></select>
                                <input type="hidden" id="HAmbulanceID" name="AmbulanceCode" />
                            </td>
                            <td align="right" width="10%">
                                行驶公里数：
                            </td>
                            <td width="15%">
                                <input id="EDriveKM" name="DriveKM" class="easyui-textbox" style="width:120px" />公里
                            </td>
                            <td align="right" width="10%">
                                急救公里数：
                            </td>
                            <td width="15%">
                                <input id="EEmergencyKM" name="EmergencyKM" class="easyui-textbox" style="width:120px" />公里
                            </td>
                        </tr>
                        <tr style="height: 22px; ">
                            <td align="right">
                                出车结果：
                            </td>
                            <td>
                                <select id="ETaskResult" class="easyui-combobox" style="width:150px"></select>
                                <input type="hidden" id="HTaskResult" name="IFNormalEnd" />
                            </td>
                            <td align="right">
                                异常结束原因：
                            </td>
                            <td>
                                @*<input id="ETaskReason" class="easyui-combobox" style="width:150px" />*@
                                <input id="ETaskReason" class="easyui-combotree" style="width:150px;">
                                <input type="hidden" id="HTaskReason" name="ResultReason" />
                            </td>
                            <td align="right">
                                备注：
                            </td>
                            <td>
                                <input id="ERemark" name="TaskRemark" class="easyui-textbox" style="width:150px" />
                            </td>
                            <td>实际救治人数：</td>
                            <td>
                                <input id="EPatientCount" name="PatientCount" class="easyui-textbox" style="width:150px" />
                            </td>
                        </tr>
                        <tr style="height: 22px; ">
                            <td align="right">
                                司机：
                            </td>
                            <td align="left">
                                <span id="LDriver" style="width:150px;"></span>
                                <input type="hidden" id="HDriverNames" name="Driver" />
                                <input type="hidden" id="HDriverCodes" name="DriverCodes" />
                                <a id="DelDriver" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" href="javascript:void(0)" onclick="DelDriver()">删除</a>
                            </td>
                            <td align="left" colspan="2">
                                <select id="EDriver" class="easyui-combobox" style="width:150px"></select>
                                <a id="AddDriver" class="easyui-linkbutton" data-options="iconCls:'icon-add'" href="javascript:void(0)" onclick="AddDriver()">添加</a>
                            </td>
                            <td align="right">
                                医生：
                            </td>
                            <td align="left">
                                <span id="LDoctor" style="width:150px;"></span>
                                <input type="hidden" id="HDoctorNames" name="Doctor" />
                                <input type="hidden" id="HDoctorCodes" name="DoctorCodes" />
                                <a id="DelDoctor" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" href="javascript:void(0)" onclick="DelDoctor()">删除</a>
                            </td>
                            <td align="left" colspan="2">
                                <select id="EDoctor" class="easyui-combobox" style="width:150px"></select>
                                <a id="AddDoctor" class="easyui-linkbutton" data-options="iconCls:'icon-add'" href="javascript:void(0)" onclick="AddDoctor()">添加</a>
                            </td>
                        </tr>
                        <tr style="height: 22px; ">
                            <td align="right">
                                护士：
                            </td>
                            <td align="left">
                                <span id="LNurse" style="width:150px;"></span>
                                <input type="hidden" id="HNurseNames" name="Nurse" />
                                <input type="hidden" id="HNurseCodes" name="NurseCodes" />
                                <a id="DelNurse" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" href="javascript:void(0)" onclick="DelNurse()">删除</a>
                            </td>
                            <td align="left" colspan="2">
                                <select id="ENurse" class="easyui-combobox" style="width:150px"></select>
                                <a id="AddNurse" class="easyui-linkbutton" data-options="iconCls:'icon-add'" href="javascript:void(0)" onclick="AddNurse()">添加</a>
                            </td>
                            <td align="right">
                                担架工：
                            </td>
                            <td align="left">
                                <span id="LLitter" style="width:150px;"></span>
                                <input type="hidden" id="HLitterNames" name="DanJiaGong" />
                                <input type="hidden" id="HLitterCodes" name="LitterCodes" />
                                <a id="DelLitter" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" href="javascript:void(0)" onclick="DelLitter()">删除</a>
                            </td>
                            <td align="left" colspan="2">
                                <select id="ELitter" class="easyui-combobox" style="width:150px"></select>
                                <a id="AddDLitter" class="easyui-linkbutton" data-options="iconCls:'icon-add'" href="javascript:void(0)" onclick="AddLitter()">添加</a>
                            </td>
                        </tr>
                        <tr style="height: 22px; ">
                            <td align="right">
                                抢救员：
                            </td>
                            <td align="left">
                                <span id="LRescue" style="width:150px;"></span>
                                <input type="hidden" id="HRescueNames" name="Rescue" />
                                <input type="hidden" id="HRescueCodes" name="RescueCodes" />
                                <a id="DelRescue" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" href="javascript:void(0)" onclick="DelRescue()">删除</a>
                            </td>
                            <td align="left" colspan="2">
                                <select id="ERescue" class="easyui-combobox" style="width:150px"></select>
                                <a id="AddRescue" class="easyui-linkbutton" data-options="iconCls:'icon-add'" href="javascript:void(0)" onclick="AddRescue()">添加</a>
                            </td>
                            <td align="right"></td>
                            <td align="left"></td>
                            <td align="left" colspan="2"></td>
                        </tr>
                        <tr style="height: 22px; ">
                            <td align="right">
                                收到指令时刻：
                            </td>
                            <td align="left">
                                <input id="EReceiveCommandTime" name="GetCommandTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                            <td align="right">
                                驶向现场时刻：
                            </td>
                            <td align="left">
                                <input id="EOutTime" name="OutAmbulanceTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                            <td align="right">
                                到达现场时刻：
                            </td>
                            <td align="left">
                                <input id="EArriveLocalTime" name="ArriveSenceTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                            <td align="right">
                                病人上车时刻：
                            </td>
                            <td align="left">
                                <input id="ELeaveLocalTime" name="LeaveSenceTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                        </tr>
                        <tr style="height: 22px; ">

                            <td align="right">
                                到达医院时刻：
                            </td>
                            <td align="left">
                                <input id="EArriveHospitalTime" name="ArriveHospitalTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                            <td align="right">
                                途中待命时刻：
                            </td>
                            <td align="left">
                                <input id="EFinishTime" name="MissionCompleteTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                            <td align="right">
                                站内待命时刻：
                            </td>
                            <td align="left">
                                <input id="EReturnStationTime" name="ReturnStationTime" class="easyui-datetimebox" style="width:150px" data-options="editable:true" />
                            </td>
                            <td align="right" colspan="2">
                                <a id="Save" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SaveTaskInfo()">保存修改</a>
                                <a id="View" class="easyui-linkbutton" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="ViewModify()">查看修改</a>
                            </td>

                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>
<div id="LookCrack" class="easyui-window" data-options="title:'修改记录',iconCls:'icon-save',closed:true,modal:true,collapsible: false,maximizable: false" style="width: 850px; height: 550px; padding: 5px;">
    <div class="easyui-layout" data-options="fit:true">
        <div data-options="region:'center',border:false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
            <div data-options="region:'center'" style="background: #fafafa; overflow: hidden">
                <table id="CrackList" class="easyui-datagrid"></table>
            </div>
        </div>
        <div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0;">
            <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="closeDialogLookCrack()">关闭窗口</a>
        </div>
    </div>
</div>

